
#ifndef __RT_THREAD_H__
#define __RT_THREAD_H__

#include <rtdef.h>


#ifdef __cplusplus
extern "C" {
#endif
  
#define	rt_kprintf(...)	

extern rt_err_t rt_device_register(rt_device_t dev,
                            const char *name,
                            rt_uint16_t flags);
							
extern rt_device_t rt_device_find(const char *name);

extern rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag);

extern rt_err_t rt_device_close(rt_device_t dev); 

extern rt_err_t rt_device_init(rt_device_t dev);

extern rt_size_t rt_device_read(rt_device_t dev,
                         rt_off_t    pos,
                         void       *buffer,
                         rt_size_t   size);
						 
extern rt_size_t rt_device_write(rt_device_t dev,
                          rt_off_t    pos,
                          const void *buffer,
                          rt_size_t   size);
						  
extern rt_err_t rt_device_control(rt_device_t dev, rt_uint8_t cmd, void *arg);

extern rt_err_t
rt_device_set_rx_indicate(rt_device_t dev,
                          rt_err_t (*rx_ind)(rt_device_t dev, rt_size_t size));
						  
extern rt_err_t
rt_device_set_tx_complete(rt_device_t dev,
                          rt_err_t (*tx_done)(rt_device_t dev, void *buffer));

#ifdef __cplusplus
}
#endif

#endif


